import request from '@/utils/request'

// 获取课程列表
export function getCourseListService() {
  return request({
    url: '/course/list',
    method: 'get'
  })
}

// 获取课程详情
export function getCourseDetailService(courseId) {
  return request({
    url: '/course/detail',
    method: 'get',
    params: { id: courseId }
  })
}

// 新增课程
export function addCourseService(data) {
  return request({
    url: '/course/add',
    method: 'post',
    data
  })
}

// 修改课程
export function updateCourseService(data) {
  return request({
    url: '/course/edit',
    method: 'put',
    data
  })
}

// 删除课程
export function deleteCourseService(courseId) {
  return request({
    url: '/course/delete',
    method: 'delete',
    params: { id: courseId }
  })
} 